const express = require('express');
const router = express.Router();
const AuthController = require('../controllers/authController');
const authMiddleware = require('../middleware/authMiddleware');

// Public routes (no authentication required)
// Register new user
router.post('/register', AuthController.register);

// Login user
router.post('/login', AuthController.login);

// Admin login
router.post('/admin/login', AuthController.adminLogin);

// Protected routes (authentication required)
// Get current user info
router.get('/current-user', authMiddleware, AuthController.getCurrentUser);

module.exports = router; 